<script>
	import {
		init
	} from './api/api.js';
	import {
		useTypeStore
	} from '@/store/type';
	export default {
		onLaunch: async function() {
			// uni.setStorageSync('isInitSqlite', '0');
			const isInitSqlite = uni.getStorageSync('isInitSqlite') || '0'
			// console.log('isInitSqlite',isInitSqlite,!isInitSqlite)
			if (isInitSqlite === '0') {
				// init
				// console.log('初始化数据')
				uni.showLoading({
					title: '正在初始化...'
				})
				await init()
			}
			const typeStore = useTypeStore()
			await typeStore.getData()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>
<style>
	@import '@/static/iconfont/iconfont.css';
	@import '@/static/iconfontColor/iconfont.css';
	@import '@/static/iconfontColor2/iconfont.css';
</style>
<style lang="scss">
	@import '@/static/style/base/index.scss';
	/*每个页面公共css */
	@import '@/uni_modules/uni-scss/index.scss';

	/* #ifndef APP-NVUE */
	// 设置整个项目的背景色
	page {
		background-color: #f5f5f5;

	}

	.out-come-bg {
		background-color: #f9ae3d;
	}

	/* #endif */
	// @import '@/static/style/themes/theme.scss';
</style>